﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Snom.Tests.Properties;

namespace Snom.Tests
{
    [TestClass]
    public class EventsTests
    {
        [TestMethod]
        public void TestGenericEvents()
        {
            using (SnomPhone snomPhone = new SnomPhone(Settings.Default.MyPhoneIpAddress, true, Settings.Default.MyEventsListeningPort))
            {
                snomPhone.AllEvents += new SnomGenericEventHandler(snomPhone_AllEvents);
            }
        }

        [TestMethod]
        public void TestEvents()
        {
            using (SnomPhone snomPhone = new SnomPhone(Settings.Default.MyPhoneIpAddress, true, Settings.Default.MyEventsListeningPort))
            {
                snomPhone.TestEvents();
            }
        }

        static void snomPhone_AllEvents(object sender, SnomGenericEventArgs e)
        {
            Console.WriteLine(e);
            Console.WriteLine("------------------------------------");
            Console.WriteLine();
        }

    }
}
